<template>
  <view w-full h-screen flex flex-col justify-between items-center>
    <view flex flex-col justify-start items-center>
      <image v-if="result.status == 1" w-300rpx h-300rpx mt-100rpx src="@/pages/ticket/static/pay_success.png"></image>
      <image v-else w-300rpx h-300rpx mt-100rpx src="@/pages/ticket/static/pay_fail.png"></image>
      <view mt-40rpx font-bold>{{ result.status == 1 ? '支付成功' : '支付失败' }}</view>
    </view>
    <view
      position-fixed
      bottom-70rpx
      w-670rpx
      box-border
      h-100rpx
      rounded-50rpx
      flex
      justify-center
      items-center
      bg="#FCC300"
      font-500
      text="#000"
      left-40rpx
      @click="toOrderList">
      返回订单页
    </view>
  </view>
</template>

<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
const result = ref<any>({
  status: 1
})
function toOrderList() {
  uni.redirectTo({
    url: '/pages/ticket/ticketOrderList'
  })
}
onMounted(() => {})
onLoad((options: any) => {
  result.value.status = options.status
  uni.setNavigationBarTitle({
    title: result.value.status == 1 ? '支付成功' : '支付失败'
  })
})
</script>
<style>
page {
  background-color: #fff;
}
</style>
<style scoped lang="scss"></style>
